/*******************************************************************************
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package com.niannian.util.network;

public interface QAsyncHandler {

	/**
	 * Invoked when an unexpected exception occurs during the processing of the
	 * response
	 * 
	 * @param t
	 *            a {@link Throwable}
	 */
	void onThrowable(Throwable t, Object cookie);

	/**
	 * Invoked once the HTTP response processing is finished.
	 * <p/>
	 * 
	 * Gets always invoked as last callback method.
	 * 
	 */
	void onCompleted(int statusCode, String Content, Object cookie);
}
